
clc
clear all

path = 'R:\TempFolder\DIP\proj2\';
name = 'Fig1.21(b)';
format = '.jpg';
c=.05;
RGB = imread(strcat(path,name,format));
figure(1); imshow(RGB)
x=fft2(RGB);        
y=ifft2(x);
yy=uint8(real(y));
figure(2)
imshow(yy)
xx=fftshift(real(x));

xxx=c*log(1+xx);
figure(3)
imshow(xxx)
%%
clc
clear all

c=1

W = ones(10,20);
WW= zeros(256,256);
WW(128-4:129+4 , 128-9:129+9)=W;
figure(1)
imshow(WW)
Y=fft(fft(WW).').'
%Y=(fft2(WW));
YY=fftshift(Y);
YYY=real(YY);
YYYY=c*log(1+YYY);
figure(2)
imshow(log10(abs(YYYY)),[-1 2],'InitialMagnification','fit'); colormap(jet); colorbar
%%
clc
clear all













